/*!
    \copyright  Copyright (c) 2025 Qualcomm Technologies International, Ltd.\n
                All Rights Reserved.\n
                Qualcomm Technologies International, Ltd. Confidential and Proprietary.
    \file
    \ingroup    usb_device
    \brief      Header file for implementation of MS-USBEPD - Platform Detection Extensions.
*/

#ifndef USB_DEVICE_PLATDE_H_
#define USB_DEVICE_PLATDE_H_

/** MS-USBEPD Platform ID Meaning */
typedef enum
{
    /** Reserved, this value MUST NOT be used by either host or device for any reason. */
    USB_MS_PLATDE_RESERVED = 0x0000,

    /** Windows 10 operating system */
    USB_MS_PLATDE_WINDOWS_10 = 0x0001,

    /** Windows 11 operating system and later */
    USB_MS_PLATDE_WINDOWS_11 = 0x0002,

    /** Windows 10 IOT Core */
    USB_MS_PLATDE_WINDOWS_10_IOT_CORE = 0x0003,

    /** Windows 11 IOT or later */
    USB_MS_PLATDE_WINDOWS_11_IOT = 0x0004,

    /** Windows Server 2016 operating system, Windows Server 2019 operating system,
     * or Windows Server 2022 operating system*/
    USB_MS_PLATDE_WINDOWS_SERVER_2016 = 0x0005,

    /** Windows Server 2025 operating system and later */
    USB_MS_PLATDE_WINDOWS_SERVER_2025 = 0x0006,

    /** Xbox console, Xbox One and later */
    USB_MS_PLATDE_XBOX = 0x0007,

    /** Microsoft OneCore based operating system */
    USB_MS_PLATDE_ONE_CORE = 0x0008,

    /** Other operating systems not better described by one of the above IDs */
    USB_MS_PLATDE_OTHER = 0x0009,

    /** Reserved for future expansion, the Host MUST NOT send this platform value. */
    USB_MS_PLATDE_RESERVED_FROM = 0x000A,
    USB_MS_PLATDE_RESERVED_TO = 0xFFFF
} usb_ms_platde_platform_t;

typedef enum
{
    USB_MS_PLATDE_RESULT_SUCCESS =   0,
    USB_MS_PLATDE_RESULT_TIMEOUT =  1,
} usb_ms_platde_result_t;

typedef void (*usb_platde_cb_t)(usb_ms_platde_result_t result, usb_ms_platde_platform_t platform_id);

/** Enable/disable support for Platform Detection Extensions */
void UsbDevice_EnablePlatDet(bool enable, usb_platde_cb_t callback, uint16 timeout);

#endif /* USB_DEVICE_PLATDE_H_ */
